package com.ylyq.ylxx.model.bean;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @ClassName OceanengineGetAudiencePackage
 * @Description TODO
 * @Author xiaweichao
 * @Date 2020/7/20 11:10
 * @Version 1.0
 */
@NoArgsConstructor
@Data
@ApiModel(value = "获取定向包返回参数")
public class OceanengineGetAudiencePackage {
    /**
     * message : OK
     * code : 0
     * data : {"custom_audience_id":1}
     */

    private String message;
    private int code;
    private DataBean data;

    @NoArgsConstructor
    @Data
    @ApiModel(value = "获取定向包返回参数实体")
    public static class DataBean {

        private AudiencePackages[] audience_packages;
        private PageInfo page_info;

        @NoArgsConstructor
        @Data
        @ApiModel(value = "获取定向包返回参数实体-分页信息")
        public static class PageInfo {
            @ApiModelProperty(value = "页数")
            private Long page;
            @ApiModelProperty(value = "页面大小")
            private Long page_size;
            @ApiModelProperty(value = "总数")
            private Long total_number;
            @ApiModelProperty(value = "总页数")
            private Long total_page;
        }
        @NoArgsConstructor
        @Data
        @ApiModel(value = "获取定向包返回参数实体-定向包信息")
        public static class AudiencePackages {

            @ApiModelProperty(value = "广告主ID")
            private Long advertiser_id;
            @ApiModelProperty(value = "定向包id")
            private Long audience_package_id;
            @ApiModelProperty(value = "定向包名称")
            private String name;
            @ApiModelProperty(value = "定向包描述")
            private String description;
            @ApiModelProperty(value = "定向包类型【附录：定向包推广类型】")
            private String landing_type;
            @ApiModelProperty(value = "定向包类型【附录：广告投放范围】")
            private String delivery_range;
            @ApiModelProperty(value = "过滤已安装\n" +
                    "            允许值：0:表示不过滤，1:表示过滤")
            private int hide_if_exists;
            @ApiModelProperty(value = "自定内容")
            private Audience audience;

            @NoArgsConstructor
            @Data
            @ApiModel(value = "获取定向包返回参数实体-定向包信息-自定内容")
            public static class Audience {

                @ApiModelProperty(value = "定向人群包列表，内容为人群包id")
                private Long[] retargeting_tags;
                @ApiModelProperty(value = "排除人群包列表，内容为人群包id")
                private Long[] retargeting_tags_exclude;
                @ApiModelProperty(value = "受众性别, 详见【附录-受众性别】允许值: GENDER_FEMALE,GENDER_MALE , NONE")
                private String gender;
                @ApiModelProperty(value = "受众年龄区间, 详见【附录-受众年龄区间】允许值: AGE_BETWEEN_18_23,AGE_BETWEEN_24_30,AGE_BETWEEN_31_40, AGE_BETWEEN_41_49,AGE_ABOVE_50")
                private String[] age;
                @ApiModelProperty(value = "受众最低android版本(当推广应用下载Android时选填,其余情况不填), 详见【附录-受众android版本】允许值: \"0.0\", \"2.0\", \"2.1\", \"2.2\", \"2.3\", \"3.0\", \"3.1\", \"3.2\", \"4.0\",\"4.1\",\"4.2\", \"4.3\", \"4.4\", \"4.5\", \"5.0\", \"NONE\"")
                private String android_osv;
                @ApiModelProperty(value = "受众最低ios版本(当推广应用下载iOS时选填,其余情况不填), 详见【附录-受众ios版本】允许值: \"0.0\", \"4.0\", \"4.1\", \"4.2\", \"4.3\", \"5.0\", \"5.1\", \"6.0\", \"7.0\",\"7.1\",\"8.0\", \"8.1\", \"8.2\", \"9.0\", \"NONE\"\n")
                private String ios_osv;
                @ApiModelProperty(value = "受众运营商, 详见【附录-受众运营商类型】允许值: \"MOBILE\", \"UNICOM\", \"TELCOM\"")
                private String[] carrier;
                @ApiModelProperty(value = "受众网络类型, 详见【附录-受众网络类型】")
                private String[] ac;
                @ApiModelProperty(value = "受众手机品牌, 详见【附录-手机品牌】")
                private String[] device_brand;
                @ApiModelProperty(value = "受众文章分类, 详见【附录-受众文章分类】")
                private String[] article_category;
                @ApiModelProperty(value = "用户首次激活时间, 详见【附录-用户首次激活时间】")
                private String[] activate_type;
                @ApiModelProperty(value = "受众平台(当推广目的landing_type=APP时,不填,且为保证投放效果,平台类型定向PC与移动端互斥)，android_osv或ios_osv非空时，必填。详见【附录-受众平台类型】")
                private String[] platform;

                @ApiModelProperty(value = "APP行为定向, 分类集合, 详见【附件-app_category.json】")
                private Object app_category;
                @ApiModelProperty(value = "APP行为定向, APP集合")
                private Object app_ids;

                @ApiModelProperty(value = "手机价格定向,传入价格区间，最高传入11000（表示1w以上）传值示例 \"launch_price\": [2000, 11000]，表示2000元以上")
                private Long[] launch_price;
                @ApiModelProperty(value = "行为兴趣选择")
                private String interest_action_mode;
                @ApiModelProperty(value = "行为场景，详见【附录-行为场景】")
                private String[] action_scene;

                @ApiModelProperty(value = "行为天数\n" +
                        "                允许值：7, 15, 30, 60, 90, 180, 365")
                private Long action_days;
                @ApiModelProperty(value = "行为类目")
                private Long[] action_categories;
                @ApiModelProperty(value = "行为关键词")
                private Long[] action_words;
                @ApiModelProperty(value = "兴趣分类")
                private Long[] interest_categories;
                @ApiModelProperty(value = "兴趣关键词, 传入具体的词id，非兴趣词包id，可以通过词包相关接口或者兴趣关键词word2id接口获取词id，一个计划下最多创建1000个关键词。")
                private Long[] interest_words;
                @ApiModelProperty(value = "地域定向城市或者区县列表(当传递省份ID时,旗下市县ID可省略不传), 详见【附件-city.json】")
                private Long[] city;
                @ApiModelProperty(value = "商圈ID数组")
                private Long[] business_ids;
                @ApiModelProperty(value = "地域类型，前者为省市，后者为区县。当city有数据时，必填。\n" +
                        "                允许值:\"CITY\",\"COUNTY\",\"BUSINESS_DISTRICT\",\"NONE\"](https://ad.oceanengine.com/openapi/doc/index.html?id=528)")
                private Object district;
                @ApiModelProperty(value = "受众位置类型,当city和district有值时，该字段必填，详见【附录-受众位置类型】")
                private String location_type;
                @ApiModelProperty(value = "地图位置，district为BUSINESS_DISTRICT才有效")
                private Geolocation[] geolocation;
                @ApiModelProperty(value = "是否启动智能放量\n" +
                        "                允许值：0表示关闭，1表示开启")
                private Long auto_extend_enabled;
                @ApiModelProperty(value = "智能放量定向\n" +
                        "                允许值：REGION（地域）,GENDER（性别）,AGE（年龄）,CUSTOM_AUDIENCE（自定义人群）")
                private String[] auto_extend_targets;
                @ApiModelProperty(value = "账号粉丝相似人群（添加抖音账号，会将广告投放给对应账号的相似人群粉丝）")
                private Long[] aweme_fans_numbers;
                @ApiModelProperty(value = "过滤高活跃用户\n" +
                        "                允许值：0:表示不过滤，1:表示过滤")
                private Long filter_aweme_abnormal_active;
                @ApiModelProperty(value = "过滤高关注数用户，例如\"filter_aweme_fans_count\": 1000表示过滤粉丝数在1000以上的用户")
                private Long filter_aweme_fans_count;
                @ApiModelProperty(value = "抖音号，过滤自己的粉丝")
                private Long own_aweme_number;
                @ApiModelProperty(value = "过滤自己的粉丝，允许值：0表示不过滤，1表示过滤")
                private Long filter_own_aweme_fans;

                private BindInfo bind_info;

                @ApiModelProperty(value = "精选流量包，详见【附录-精选流量包】")
                private String superior_popularity_type;
                @ApiModelProperty(value = "定向流量包ID数组")
                private Long[] flow_package;
                @ApiModelProperty(value = "排除流量包ID数组")
                private Long[] exclude_flow_package;
                @ApiModelProperty(value = "抖音号id，与aweme_fan_behaviors同时设置才会生效（抖音达人定向）")
                private Long[] aweme_fan_accounts;
                @ApiModelProperty(value = "抖音类目id，与aweme_fan_behaviors同时设置才会生效（抖音达人定向）")
                private Long[] aweme_fan_categories;
                @ApiModelProperty(value = "抖音用户行为类型, 详见【附录-抖音用户行为类型】\n" +
                        "                允许值:\n" +
                        "                        \"FOLLOWED_USER\",\"COMMENTED_USER\",\"LIKED_USER\",\"SHARED_USER\"（抖音达人定向）")
                private String[] aweme_fan_behaviors;


                @NoArgsConstructor
                @Data
                @ApiModel(value = "获取定向包返回参数实体-定向包信息-自定内容-定向包绑定计划信息")
                public static class BindInfo {
                    @ApiModelProperty(value = "计划ID")
                    private Long ad_id;
                }
                @NoArgsConstructor
                @Data
                @ApiModel(value = "获取定向包返回参数实体-定向包信息-自定内容-地图位置")
                public static class Geolocation {
                    @ApiModelProperty(value = "省份名")
                    private String province;
                    @ApiModelProperty(value = "城市名")
                    private String city;
                    @ApiModelProperty(value = "地点名字")
                    private String name;
                    @ApiModelProperty(value = "经度")
                    private Float long_;
                    @ApiModelProperty(value = "纬度")
                    private Float lat;
                    @ApiModelProperty(value = "街道名")
                    private String street;
                    @ApiModelProperty(value = "区域名")
                    private String district;

                }

            }
        }
    }
}
